1. Field of the Invention
This invention relates generally to information storage and retrieval systems and more particularly to a method and system for managing the data being processed in the information and retrieval system.
2. Description of the Related Art
The advent of electronic commerce and developments in computer networking have provided opportunities for the management of the data being processed through the databases associated with these networks. Conventional databases, e.g., relational databases, object databases, hierarchical databases, flat files, etc. may be used to retrieve information for an application. These databases will have the capability of persistent storage, i.e., the storage of the data is independent of the application state. With reference to object oriented software, the software for managing the transactions occurring through a storage system must maintain the transaction state of all persistent objects.
FIG. 1 is a simplified schematic diagram of a persistent framework. Database 100 contains data in tabular format, such as database table 102. Database table 102 includes a number of fields. For example, with respect to a sales application, the fields of database table 102 may include identification numbers, product numbers, product description, etc. As customers may be ordering products and changing existing orders saved in the persistent framework, the transactions must be managed in an orderly fashion. Table 104 is shown for illustrative purposes only and one skilled in the art will appreciate that the data the application uses comes from the persistent objects created by the application. Objects 106a-106n are associated with corresponding rows of database table 102. For example, client 108 may change a previously ordered item through modification 109, which is captured by the corresponding persistent object, i.e., object 1 106a. The modification captured by object 1 106a is then committed to database table 102 to update the corresponding order in the database table.
At certain points in time, there are differences between what is stored in database 100 and the data in application (illustratively represented by table 104). One commonly used method for managing the differences between data an application is using, relative to the data in persistent storage, is the use of multiple caches and transaction states where a single cache is associated with a single state. That is, each cache stores persistent objects associated with a particular transaction state object or attribute. For example, all objects having an old-dirty status are stored in one cache; objects having an old-clean status are stored in another cache and so on.
One shortcoming of the multiple cache technique is that multiple threads, multiple users, etc., can not be supported. For instance, saving changes made by a particular thread is not possible as the objects associated with a particular thread are dispersed throughout multiple caches. In addition, the order in which persistent objects were modified or created is not preserved. Another shortcoming of the multiple cache technique is that a search for a particular object requires searching each cache, which makes searching for particular objects difficult and complex.
Another technique of managing the differences between data an application is using, relative to corresponding data in persistent storage, is the use of a single large cache. Each persistent object is given an additional attribute to storage for its current transaction state. In the previously mentioned technique, a separate cache is used for each set of persistent objects belonging to the same transaction state. As with the multiple cache technique, saving changes for a particular thread is not possible with the single large cache. Additionally, the entire cache must be scanned to determine the appropriate action to take upon a commit or rollback operation.
As a result, there is a need to solve the problems of the prior art to provide a method and system for efficiently managing transactions in a persistent framework.